#include "cmeal.h"

CMeal::CMeal(QObject *parent) :
    CObject(parent)
{
//    m_id = KInvalidId;
    m_description = KNullString;
    m_name = KNullString;
    m_schedule_time = 0;
    m_status = Default;
}


//int CMeal::id() {
//    return m_id;
//}

//void CMeal::setId(int id) {
//    if (m_id != id) {
//        m_id = id;
//        emit idChanged();
//    }
//}

QString CMeal::name() {
    return m_name;
}

void CMeal::setName(QString name) {
    if (m_name != name) {
        m_name = name;
        emit nameChanged();
    }
}

QString CMeal::description() {
    return m_description;
}

void CMeal::setDescription(QString desc) {
    if (m_description != m_description) {
        m_description = desc;
        emit descriptionChanged();
    }
}
int CMeal::scheduleTime() {
    return m_schedule_time;
}

void CMeal::setScheduleTime(int scheduleTime) {
    if (m_schedule_time != scheduleTime) {
        m_schedule_time = scheduleTime;
        emit scheduleTimeChanged();
    }
}

CMeal::MealStatus CMeal::status() {
    return m_status;
}

void CMeal::setStatus(CMeal::MealStatus status) {
    if (m_status != status) {
        m_status = status;
        emit statusChanged();
    }
}
